package com.tdkj.model.bbs;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * EjfArchiveReplyId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class EjfArchiveReplyId implements java.io.Serializable {

	// Fields

	private Integer replyId;
	private Integer topicId;
	private String userId;
	private String remoteIp;
	private String title;
	private String content;
	private Short attaches;
	private String isHidePost;
	private String isBest;
	private String state;
	private Timestamp createTime;
	private Timestamp updateTime;

	// Constructors

	/** default constructor */
	public EjfArchiveReplyId() {
	}

	/** minimal constructor */
	public EjfArchiveReplyId(Integer replyId, Integer topicId, String userId, String content, Timestamp updateTime) {
		this.replyId = replyId;
		this.topicId = topicId;
		this.userId = userId;
		this.content = content;
		this.updateTime = updateTime;
	}

	/** full constructor */
	public EjfArchiveReplyId(Integer replyId, Integer topicId, String userId, String remoteIp, String title, String content, Short attaches, String isHidePost, String isBest, String state, Timestamp createTime, Timestamp updateTime) {
		this.replyId = replyId;
		this.topicId = topicId;
		this.userId = userId;
		this.remoteIp = remoteIp;
		this.title = title;
		this.content = content;
		this.attaches = attaches;
		this.isHidePost = isHidePost;
		this.isBest = isBest;
		this.state = state;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}

	// Property accessors

	@Column(name = "replyID", nullable = false)
	public Integer getReplyId() {
		return this.replyId;
	}

	public void setReplyId(Integer replyId) {
		this.replyId = replyId;
	}

	@Column(name = "topicID", nullable = false)
	public Integer getTopicId() {
		return this.topicId;
	}

	public void setTopicId(Integer topicId) {
		this.topicId = topicId;
	}

	@Column(name = "userID", nullable = false, length = 15)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Column(name = "remoteIP", length = 25)
	public String getRemoteIp() {
		return this.remoteIp;
	}

	public void setRemoteIp(String remoteIp) {
		this.remoteIp = remoteIp;
	}

	@Column(name = "title", length = 100)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "content", nullable = false, length = 16777215)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "attaches")
	public Short getAttaches() {
		return this.attaches;
	}

	public void setAttaches(Short attaches) {
		this.attaches = attaches;
	}

	@Column(name = "isHidePost", length = 1)
	public String getIsHidePost() {
		return this.isHidePost;
	}

	public void setIsHidePost(String isHidePost) {
		this.isHidePost = isHidePost;
	}

	@Column(name = "isBest", length = 1)
	public String getIsBest() {
		return this.isBest;
	}

	public void setIsBest(String isBest) {
		this.isBest = isBest;
	}

	@Column(name = "state", length = 1)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "createTime", length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	@Column(name = "updateTime", nullable = false, length = 19)
	public Timestamp getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof EjfArchiveReplyId))
			return false;
		EjfArchiveReplyId castOther = (EjfArchiveReplyId) other;

		return ((this.getReplyId() == castOther.getReplyId()) || (this.getReplyId() != null && castOther.getReplyId() != null && this.getReplyId().equals(castOther.getReplyId())))
				&& ((this.getTopicId() == castOther.getTopicId()) || (this.getTopicId() != null && castOther.getTopicId() != null && this.getTopicId().equals(castOther.getTopicId())))
				&& ((this.getUserId() == castOther.getUserId()) || (this.getUserId() != null && castOther.getUserId() != null && this.getUserId().equals(castOther.getUserId())))
				&& ((this.getRemoteIp() == castOther.getRemoteIp()) || (this.getRemoteIp() != null && castOther.getRemoteIp() != null && this.getRemoteIp().equals(castOther.getRemoteIp())))
				&& ((this.getTitle() == castOther.getTitle()) || (this.getTitle() != null && castOther.getTitle() != null && this.getTitle().equals(castOther.getTitle())))
				&& ((this.getContent() == castOther.getContent()) || (this.getContent() != null && castOther.getContent() != null && this.getContent().equals(castOther.getContent())))
				&& ((this.getAttaches() == castOther.getAttaches()) || (this.getAttaches() != null && castOther.getAttaches() != null && this.getAttaches().equals(castOther.getAttaches())))
				&& ((this.getIsHidePost() == castOther.getIsHidePost()) || (this.getIsHidePost() != null && castOther.getIsHidePost() != null && this.getIsHidePost().equals(castOther.getIsHidePost())))
				&& ((this.getIsBest() == castOther.getIsBest()) || (this.getIsBest() != null && castOther.getIsBest() != null && this.getIsBest().equals(castOther.getIsBest())))
				&& ((this.getState() == castOther.getState()) || (this.getState() != null && castOther.getState() != null && this.getState().equals(castOther.getState())))
				&& ((this.getCreateTime() == castOther.getCreateTime()) || (this.getCreateTime() != null && castOther.getCreateTime() != null && this.getCreateTime().equals(castOther.getCreateTime())))
				&& ((this.getUpdateTime() == castOther.getUpdateTime()) || (this.getUpdateTime() != null && castOther.getUpdateTime() != null && this.getUpdateTime().equals(castOther.getUpdateTime())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getReplyId() == null ? 0 : this.getReplyId().hashCode());
		result = 37 * result + (getTopicId() == null ? 0 : this.getTopicId().hashCode());
		result = 37 * result + (getUserId() == null ? 0 : this.getUserId().hashCode());
		result = 37 * result + (getRemoteIp() == null ? 0 : this.getRemoteIp().hashCode());
		result = 37 * result + (getTitle() == null ? 0 : this.getTitle().hashCode());
		result = 37 * result + (getContent() == null ? 0 : this.getContent().hashCode());
		result = 37 * result + (getAttaches() == null ? 0 : this.getAttaches().hashCode());
		result = 37 * result + (getIsHidePost() == null ? 0 : this.getIsHidePost().hashCode());
		result = 37 * result + (getIsBest() == null ? 0 : this.getIsBest().hashCode());
		result = 37 * result + (getState() == null ? 0 : this.getState().hashCode());
		result = 37 * result + (getCreateTime() == null ? 0 : this.getCreateTime().hashCode());
		result = 37 * result + (getUpdateTime() == null ? 0 : this.getUpdateTime().hashCode());
		return result;
	}

}